package com.ttsx.pojo.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.ttsx.core.mybatis.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

/**
 * 分类表
 * @author lucky
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class Category extends BaseEntity {

    /**
     * 父级分类ID
     */
    private Long parentId;

    /**
     * 分类名称
     */
    private String name;

    private String imageUrl;

    /**
     * 分类描述
     */
    private String description;


    @TableField(exist = false)
    private List<Product> products;

    @TableField(exist = false)
    private List<Category> children;
}